#include "LinearMath/btQuaternion.h"
#ifdef __cplusplus
extern "C" {
#endif
btQuaternionFloatData* bullet_NewbtQuaternionFloatData(){
	btQuaternionFloatData* wrap_out = new btQuaternionFloatData();
	return wrap_out;
}

float** bullet_btQuaternionFloatData_GetFieldOfM_floats(btQuaternionFloatData* c_this){
	return (float**)(&c_this->m_floats);
}

btQuaternionDoubleData* bullet_NewbtQuaternionDoubleData(){
	btQuaternionDoubleData* wrap_out = new btQuaternionDoubleData();
	return wrap_out;
}

double** bullet_btQuaternionDoubleData_GetFieldOfM_floats(btQuaternionDoubleData* c_this){
	return (double**)(&c_this->m_floats);
}

btQuaternion* bullet_NewbtQuaternion(){
	btQuaternion* wrap_out = new btQuaternion();
	return wrap_out;
}

btQuaternion* bullet_NewbtQuaternion1(double* _x,double* _y,double* _z,double* _w){
	btScalar const& c_arg__x=(btScalar const&)(*_x);
	btScalar const& c_arg__y=(btScalar const&)(*_y);
	btScalar const& c_arg__z=(btScalar const&)(*_z);
	btScalar const& c_arg__w=(btScalar const&)(*_w);
	btQuaternion* wrap_out = new btQuaternion(c_arg__x,c_arg__y,c_arg__z,c_arg__w);
	return wrap_out;
}

btQuaternion* bullet_NewbtQuaternion2(btVector3* _axis,double* _angle){
	btVector3 const& c_arg__axis=(btVector3 const&)(*_axis);
	btScalar const& c_arg__angle=(btScalar const&)(*_angle);
	btQuaternion* wrap_out = new btQuaternion(c_arg__axis,c_arg__angle);
	return wrap_out;
}

btQuaternion* bullet_NewbtQuaternion3(double* yaw,double* pitch,double* roll){
	btScalar const& c_arg_yaw=(btScalar const&)(*yaw);
	btScalar const& c_arg_pitch=(btScalar const&)(*pitch);
	btScalar const& c_arg_roll=(btScalar const&)(*roll);
	btQuaternion* wrap_out = new btQuaternion(c_arg_yaw,c_arg_pitch,c_arg_roll);
	return wrap_out;
}

double bullet_btQuaternion_angle(btQuaternion* c_this,btQuaternion* q){
	btQuaternion const& c_arg_q=(btQuaternion const&)(*q);
	btScalar c_out = c_this->angle(c_arg_q);
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btQuaternion_angleShortestPath(btQuaternion* c_this,btQuaternion* q){
	btQuaternion const& c_arg_q=(btQuaternion const&)(*q);
	btScalar c_out = c_this->angleShortestPath(c_arg_q);
	double wrap_out = (c_out);
	return wrap_out;
}

void bullet_btQuaternion_deSerialize(btQuaternion* c_this,btQuaternionFloatData* dataIn){
	btQuaternionFloatData const& c_arg_dataIn=(btQuaternionFloatData const&)(*dataIn);
	c_this->deSerialize(c_arg_dataIn);
}

void bullet_btQuaternion_deSerialize1(btQuaternion* c_this,btQuaternionDoubleData* dataIn){
	btQuaternionDoubleData const& c_arg_dataIn=(btQuaternionDoubleData const&)(*dataIn);
	c_this->deSerialize(c_arg_dataIn);
}

void bullet_btQuaternion_deSerializeDouble(btQuaternion* c_this,btQuaternionDoubleData* dataIn){
	btQuaternionDoubleData const& c_arg_dataIn=(btQuaternionDoubleData const&)(*dataIn);
	c_this->deSerializeDouble(c_arg_dataIn);
}

void bullet_btQuaternion_deSerializeFloat(btQuaternion* c_this,btQuaternionFloatData* dataIn){
	btQuaternionFloatData const& c_arg_dataIn=(btQuaternionFloatData const&)(*dataIn);
	c_this->deSerializeFloat(c_arg_dataIn);
}

double bullet_btQuaternion_dot(btQuaternion* c_this,btQuaternion* q){
	btQuaternion const& c_arg_q=(btQuaternion const&)(*q);
	btScalar c_out = c_this->dot(c_arg_q);
	double wrap_out = (c_out);
	return wrap_out;
}

btQuaternion* bullet_btQuaternion_farthest(btQuaternion* c_this,btQuaternion* qd){
	btQuaternion const& c_arg_qd=(btQuaternion const&)(*qd);
	btQuaternion c_out = c_this->farthest(c_arg_qd);
	btQuaternion* wrap_out = new btQuaternion(c_out);
	return wrap_out;
}

double bullet_btQuaternion_getAngle(btQuaternion* c_this){
	btScalar c_out = c_this->getAngle();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btQuaternion_getAngleShortestPath(btQuaternion* c_this){
	btScalar c_out = c_this->getAngleShortestPath();
	double wrap_out = (c_out);
	return wrap_out;
}

btVector3* bullet_btQuaternion_getAxis(btQuaternion* c_this){
	btVector3 c_out = c_this->getAxis();
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

void bullet_btQuaternion_getEulerZYX(btQuaternion* c_this,double* yawZ,double* pitchY,double* rollX){
	btScalar& c_arg_yawZ=(btScalar&)(*yawZ);
	btScalar& c_arg_pitchY=(btScalar&)(*pitchY);
	btScalar& c_arg_rollX=(btScalar&)(*rollX);
	c_this->getEulerZYX(c_arg_yawZ,c_arg_pitchY,c_arg_rollX);
}

btQuaternion* bullet_btQuaternion_getIdentity(btQuaternion* c_this){
	btQuaternion const& c_out = c_this->getIdentity();
	btQuaternion* wrap_out = (btQuaternion*)(&c_out);
	return wrap_out;
}

double* bullet_btQuaternion_getW(btQuaternion* c_this){
	btScalar const& c_out = c_this->getW();
	double* wrap_out = (double*)(&c_out);
	return wrap_out;
}

btQuaternion* bullet_btQuaternion_inverse(btQuaternion* c_this){
	btQuaternion c_out = c_this->inverse();
	btQuaternion* wrap_out = new btQuaternion(c_out);
	return wrap_out;
}

double bullet_btQuaternion_length(btQuaternion* c_this){
	btScalar c_out = c_this->length();
	double wrap_out = (c_out);
	return wrap_out;
}

double bullet_btQuaternion_length2(btQuaternion* c_this){
	btScalar c_out = c_this->length2();
	double wrap_out = (c_out);
	return wrap_out;
}

btQuaternion* bullet_btQuaternion_nearest(btQuaternion* c_this,btQuaternion* qd){
	btQuaternion const& c_arg_qd=(btQuaternion const&)(*qd);
	btQuaternion c_out = c_this->nearest(c_arg_qd);
	btQuaternion* wrap_out = new btQuaternion(c_out);
	return wrap_out;
}

btQuaternion* bullet_btQuaternion_normalize(btQuaternion* c_this){
	btQuaternion& c_out = c_this->normalize();
	btQuaternion* wrap_out = (btQuaternion*)(&c_out);
	return wrap_out;
}

btQuaternion* bullet_btQuaternion_normalized(btQuaternion* c_this){
	btQuaternion c_out = c_this->normalized();
	btQuaternion* wrap_out = new btQuaternion(c_out);
	return wrap_out;
}

btQuaternion* bullet_btQuaternion_safeNormalize(btQuaternion* c_this){
	btQuaternion& c_out = c_this->safeNormalize();
	btQuaternion* wrap_out = (btQuaternion*)(&c_out);
	return wrap_out;
}

void bullet_btQuaternion_serialize(btQuaternion* c_this,btQuaternionDoubleData* dataOut){
	btQuaternionDoubleData& c_arg_dataOut=(btQuaternionDoubleData&)(*dataOut);
	c_this->serialize(c_arg_dataOut);
}

void bullet_btQuaternion_serializeDouble(btQuaternion* c_this,btQuaternionDoubleData* dataOut){
	btQuaternionDoubleData& c_arg_dataOut=(btQuaternionDoubleData&)(*dataOut);
	c_this->serializeDouble(c_arg_dataOut);
}

void bullet_btQuaternion_serializeFloat(btQuaternion* c_this,btQuaternionFloatData* dataOut){
	btQuaternionFloatData& c_arg_dataOut=(btQuaternionFloatData&)(*dataOut);
	c_this->serializeFloat(c_arg_dataOut);
}

void bullet_btQuaternion_setEuler(btQuaternion* c_this,double* yaw,double* pitch,double* roll){
	btScalar const& c_arg_yaw=(btScalar const&)(*yaw);
	btScalar const& c_arg_pitch=(btScalar const&)(*pitch);
	btScalar const& c_arg_roll=(btScalar const&)(*roll);
	c_this->setEuler(c_arg_yaw,c_arg_pitch,c_arg_roll);
}

void bullet_btQuaternion_setEulerZYX(btQuaternion* c_this,double* yawZ,double* pitchY,double* rollX){
	btScalar const& c_arg_yawZ=(btScalar const&)(*yawZ);
	btScalar const& c_arg_pitchY=(btScalar const&)(*pitchY);
	btScalar const& c_arg_rollX=(btScalar const&)(*rollX);
	c_this->setEulerZYX(c_arg_yawZ,c_arg_pitchY,c_arg_rollX);
}

void bullet_btQuaternion_setRotation(btQuaternion* c_this,btVector3* axis,double* _angle){
	btVector3 const& c_arg_axis=(btVector3 const&)(*axis);
	btScalar const& c_arg__angle=(btScalar const&)(*_angle);
	c_this->setRotation(c_arg_axis,c_arg__angle);
}

btQuaternion* bullet_btQuaternion_slerp(btQuaternion* c_this,btQuaternion* q,double* t){
	btQuaternion const& c_arg_q=(btQuaternion const&)(*q);
	btScalar const& c_arg_t=(btScalar const&)(*t);
	btQuaternion c_out = c_this->slerp(c_arg_q,c_arg_t);
	btQuaternion* wrap_out = new btQuaternion(c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
